package com.itheima.d07_singleton;

/**
 * 目标：掌握单例设计模式
 *          1.解决的问题
 *          2.书写步骤
 */
public class Test {

    public static void main(String[] args) {
        //TaskManager t1 = new TaskManager();
        //TaskManager t2 = new TaskManager();
        //TaskManager t3 = new TaskManager();

        //System.out.println(t1);
        //System.out.println(t2);
        //System.out.println(t3);


        TaskManager t1 = TaskManager.getInstance();
        TaskManager t2 = TaskManager.getInstance();
        TaskManager t3 = TaskManager.getInstance();

        System.out.println(t1);
        System.out.println(t2);
        System.out.println(t3);

        System.out.println("------------");

        GC gc1 = GC.getGc();
        GC gc2 = GC.getGc();
        GC gc3 = GC.getGc();

        System.out.println(gc1);
        System.out.println(gc2);
        System.out.println(gc3);
    }
}
